<?php

namespace App\Models\Biz;

use Illuminate\Database\Eloquent\Model;
use Laracasts\Presenter\PresentableTrait;

class Record extends Model  
{
	use PresentableTrait; 
  	
	protected $table = 'biz_records';

	protected $presenter = 'App\Http\Presenters\Biz\RecordPresenter';

	protected $guarded = array();

	public $timestamps = false;	

	/**
	 * 交易记录所属的订单
	 * @return [type] [description]
	 */
	public function order()
	{
		return $this->belongsTo('\App\Models\Biz\Order');
	}


	/**
	 * 交易记录所属的会员
	 * @return [type] [description]
	 */
	public function member()
	{
		return $this->belongsTo('\App\Models\Mgt\Member');
	}


	/**
	 * 交易记录所属的业务员
	 * @return [type] [description]
	 */
	public function sales()
	{
		return $this->belongsTo('\App\Models\Mgt\Sales');
	}


	/**
	 * 交易记录所属的会员卡
	 * @return [type] [description]
	 */
	public function card()
	{
		return $this->belongsTo('\App\Models\Mgt\Card');
	}

	public function staff()
    {
        return $this->belongsTo('\App\Models\Acl\Staff');
    }

	
}